package com.aaa.mrcai.controller;

import com.aaa.mrcai.pojo.vo.PasswordVO;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.PasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author meowyf
 * @version 1.0
 * @Name Z_MJ
 * @date 2021/12/11 15:10:07
 */
@Controller
@RequestMapping("password")
public class PasswordController {
    @Autowired
    private PasswordService passwordService;

    @RequestMapping("/list/{uid}")
    @ResponseBody
    public AjaxResult list(@PathVariable int uid){
        /*System.out.println("2322222222222222222"+uid);*/
        return passwordService.list(uid);
    }

    @RequestMapping("updatePassword")
    @ResponseBody
    public AjaxResult updatePassword(PasswordVO passwordVO){
        /*System.out.println("asdasdasda"+passwordVO);*/
        return passwordService.updatePassword(passwordVO);
    }


}
